

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    
    <title>My Install Notes &mdash; Cogent Viewer 0.1 documentation</title>
    
    <link rel="stylesheet" href="_static/rtd.css" type="text/css" />
    <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
    
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    '',
        VERSION:     '0.1',
        COLLAPSE_INDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true
      };
    </script>
    <script type="text/javascript" src="_static/jquery.js"></script>
    <script type="text/javascript" src="_static/underscore.js"></script>
    <script type="text/javascript" src="_static/doctools.js"></script>
    <link rel="top" title="Cogent Viewer 0.1 documentation" href="index.html" />
    <link rel="up" title="Cruft and Notes" href="cruft.html" />
    <link rel="next" title="Database Versioning and Migration" href="dbVersion.html" />
    <link rel="prev" title="Cruft and Notes" href="cruft.html" /> 
  </head>
  <body>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="dbVersion.html" title="Database Versioning and Migration"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="cruft.html" title="Cruft and Notes"
             accesskey="P">previous</a> |</li>
        <li><a href="index.html">Cogent Viewer 0.1 documentation</a> &raquo;</li>
          <li><a href="cruft.html" accesskey="U">Cruft and Notes</a> &raquo;</li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body">
            
  <div class="section" id="my-install-notes">
<h1>My Install Notes<a class="headerlink" href="#my-install-notes" title="Permalink to this headline">¶</a></h1>
<p>For upgrading servers to the latest version of the code</p>
<div class="section" id="prep">
<h2>Prep<a class="headerlink" href="#prep" title="Permalink to this headline">¶</a></h2>
<p>Update /etc/dhcp3/dhclient.conf:</p>
<div class="highlight-python"><pre>prepend domain-name-servers 208.67.222.222,208.67.220.220;</pre>
</div>
<p>Install following packages:</p>
<div class="highlight-python"><pre>$sudo apt-get update
$sudo apt-get install python-dev python-pip python-virtualenv libmysqlclient-dev bzr curl</pre>
</div>
<p>Update PIP:</p>
<div class="highlight-python"><pre>$curl https://raw.github.com/pypa/pip/master/contrib/get-pip.py | sudo python</pre>
</div>
<p>Stop all services:</p>
<div class="highlight-python"><pre>$sudo service ch-base stop
$sudo service ch-sf stop</pre>
</div>
<p>Remove old cronjobs:</p>
<div class="highlight-python"><pre>sudo rm /etc/cron.daily/yieldSender</pre>
</div>
</div>
<div class="section" id="base-code">
<h2>Base Code<a class="headerlink" href="#base-code" title="Permalink to this headline">¶</a></h2>
<p>SCP Latest version of the basestation code from my machine and install with setup.py develop</p>
<p>There may be an issue with mysql python,  in which case:</p>
<div class="highlight-python"><pre>$sudo easy_install mysql-python</pre>
</div>
<p>Backup the DB:</p>
<div class="highlight-python"><pre>$mysqldump -u chuser -l -v ch &gt; preupgrade.sql</pre>
</div>
<p>And upgrade:</p>
<div class="highlight-python"><pre>$cd ~/djgoldsmith-devel/cogent/
$sudo pip install alembic
$alembic upgrade head</pre>
</div>
<p>Restart services:</p>
<div class="highlight-python"><pre>$sudo service ch-base start
$sudo service ch-sf start</pre>
</div>
</div>
<div class="section" id="webinterface">
<h2>Webinterface<a class="headerlink" href="#webinterface" title="Permalink to this headline">¶</a></h2>
<p>Grab latest web interface from My Machine (Over Shared Network):</p>
<div class="highlight-python"><pre>$bzr clone bzr+ssh://dang@10.42.0.1/home/dang/WebInterface/viewer-repo/webinterface.graphs webinterface</pre>
</div>
<p>And install on the host machine</p>
<blockquote>
<div>$sudo python setup.py develop</div></blockquote>
<p>Copy JS Librarys from my machine And fix up links:</p>
<div class="highlight-python"><pre>dan@euler:~/tar -xvf jslibs.tar.gz
dan@euler:~/cd jslibs
dan@euler:~/jslibs$ ln -s dojo-release-1.8.0/ dojo
dan@euler:~/jslibs$ ln -s Highcharts-2.3.2/ Highcharts
dan@euler:~/jslibs$ ln -s Highstock-1.2.2/ Highstock
dan@euler:~/jslibs$ cd ../webinterface/cogentviewer/
dan@euler:~/webinterface/cogentviewer$ ln -s /home/dan/jslibs .</pre>
</div>
<p>Enable proxy:</p>
<div class="highlight-python"><pre>sudo a2enmod proxy_http</pre>
</div>
<p>And edit /etc/apache2/sites-available/default:</p>
<div class="highlight-python"><pre>ProxyRequests Off
ProxyPreserveHost On

&lt;Proxy *&gt;
    Order allow,deny
    Allow from all
&lt;/Proxy&gt;

ProxyPass /webInterface/ http://localhost:6543/
ProxyPassReverse /webInterface/ http://localhost:6543/</pre>
</div>
<p>Restart Apache and manually start webinterface:</p>
<div class="highlight-python"><pre>sudo /etc/init.d/apache2 restart
pserve proxy.ini</pre>
</div>
<p>Test by visiting <a class="reference external" href="http://euler.local/webInterface/timeseries">http://euler.local/webInterface/timeseries</a></p>
<p>Setup webinterface auto start in /etc/init/webinterface.conf:</p>
<div class="highlight-python"><pre>description "Start Orbit Web Interface"
author "Dj Goldsmith"

start on runlevel [2345]
stop on runlevel [016]

script
    exec &gt; /tmp/webinterface.out 2&gt;&amp;1
    cd /home/dan/webinterface
    exec pserve proxy.ini
end script</pre>
</div>
</div>
</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar">
        <div class="sphinxsidebarwrapper">
  <h3><a href="index.html">Table Of Contents</a></h3>
  <ul>
<li><a class="reference internal" href="#">My Install Notes</a><ul>
<li><a class="reference internal" href="#prep">Prep</a></li>
<li><a class="reference internal" href="#base-code">Base Code</a></li>
<li><a class="reference internal" href="#webinterface">Webinterface</a></li>
</ul>
</li>
</ul>

  <h4>Previous topic</h4>
  <p class="topless"><a href="cruft.html"
                        title="previous chapter">Cruft and Notes</a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="dbVersion.html"
                        title="next chapter">Database Versioning and Migration</a></p>
  <h3>This Page</h3>
  <ul class="this-page-menu">
    <li><a href="_sources/dansInstallNotes.txt"
           rel="nofollow">Show Source</a></li>
  </ul>
<div id="searchbox" style="display: none">
  <h3>Quick search</h3>
    <form class="search" action="search.html" method="get">
      <input type="text" name="q" />
      <input type="submit" value="Go" />
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>
    <p class="searchtip" style="font-size: 90%">
    Enter search terms or a module, class or function name.
    </p>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="dbVersion.html" title="Database Versioning and Migration"
             >next</a> |</li>
        <li class="right" >
          <a href="cruft.html" title="Cruft and Notes"
             >previous</a> |</li>
        <li><a href="index.html">Cogent Viewer 0.1 documentation</a> &raquo;</li>
          <li><a href="cruft.html" >Cruft and Notes</a> &raquo;</li> 
      </ul>
    </div>
    <div class="footer">
        &copy; Copyright 2011, Daniel Goldsmith.
      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3.
    </div>
  </body>
</html>